<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class SpecGoodsImage extends Model
{
    protected $fillable = ['goods_id', 'spec_item_id', 'thumb'];

    public function goods()
    {
        return $this->belongsTo('App\Goods');
    }

    public function getThumbAttribute($value)
    {
        return asset('storage/'.$value);
    }
}
